package com.cjg.xiancheng;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

public class Pool {
    public static void main(String[] args) {
        ExecutorService executors = Executors.newFixedThreadPool(5);
        executors.execute(new a()); executors.execute(new a()); executors.execute(new a()); executors.execute(new a()); executors.execute(new a());
        executors.shutdown();
    }
}

class a implements  Runnable{

    @Override
    public void run() {
        System.out.println(Thread.currentThread().getName());
    }
}
